<!doctype html>
<html lang="en" ng-app="ngapp">
  <head>
    <title>{{ title }}</title>

    {% block meta %}{% endblock %}

    <link href="//netdna.bootstrapcdn.com/bootstrap/3.0.2/css/bootstrap.min.css" rel="stylesheet">
    <link href="/static/main.css" rel="stylesheet">
    <script type="text/javascript">
      var _gaq = _gaq || [];
      _gaq.push(['_setAccount', 'UA-35014753-1']);
      _gaq.push(['_trackPageview']);

      (function() {
        var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
      })();
    </script>

    <script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
    <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.3/angular.min.js"></script>
    <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.3/angular-route.min.js"></script>
    <script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.3/angular-resource.min.js"></script>
    <script src="//netdna.bootstrapcdn.com/bootstrap/3.0.2/js/bootstrap.min.js"></script>

    <script src="/static/angular-ui/template/accordion/accordion-group.html.js"></script>
    <script src="/static/angular-ui/template/accordion/accordion.html.js"></script>
    <script src="/static/angular-ui/js/ui-bootstrap-0.11.0.min.js"></script>

    {% block extra_scripts %}{% endblock %}
  </head>
  <body>
    <div id="wrap">
      <div class="navbar navbar-default navbar-fixed-top" role="navigation">
        <div class="container">
          <div class="navbar-header">
            <a class="navbar-brand" href="#">My Blog</a>
          </div>
          <div class="collapse navbar-collapse">
            <ul class="nav navbar-nav">
              <li class="{{ 'active' if activePill=='blog' }}"><a href="/blog/" target="_self">Blog</a></li>
              <li class="{{ 'active' if activePill=='mytools' }}"><a href="/online-tools/" target="_self">Online Tools</a></li>
            </ul>
            <ul class="nav navbar-nav navbar-right">
              {% if isAdmin %}<li class="{{ 'active' if activePill=='admin' }}"><a href="/blog/admin" target="_self">Admin</a></li>{% endif %}
              <li><a href="http://about.me/davidshen" target="_blank">About Me</a></li>
            </ul>
          </div>
        </div>
      </div>
      <div class="container">
        <div ng-controller="RootCtrl">
          <div class="page-header">
            <h1 id="title">{{ title }}</h1>
          </div>
          {% block body %}{% endblock %}
        </div>
      </div>
    </div>
    <div id="footer">
      <div class="container">
        <ol class="breadcrumb">
          <strong class=>Powered by&nbsp;</strong>
          <li>Python</li>
          <li>GAE</li>
          <li>markdown2</li>
          <li>Flask</li>
          <li>jinja2</li>
        </ol>
      </div>
    </div>
    {% block scripts %}
    {% endblock %}
  </body>
</html>
